package band.wukong.practice.java.core.pack.util.function;

import java.util.function.BiConsumer;

/**
 * @author wukong(wukonggg@139.com)
 */
public class BiConsumerSample {

    public static void main(String[] args) {
        BiConsumer<String, String> b1 = new BiConsumer<String, String>() {
            @Override
            public void accept(String x, String y) {
                System.out.println(x);
                System.out.println(y);
            }
        };
        b1.accept("白日依山尽", "黄河入海流");

        BiConsumer<String, String> b2 = b1.andThen((x, y) -> {
            System.out.println(x + ", " + y);
        });
        b2.accept("123", "555");
    }

}
